'use strict'

import destroyZouShiDom from './destroyZouShiDom'
import createZouShi from './createZouShi'

//取消页面多选框选中后生成的效果

/**
 * 
 * @param {Number} index  多选框的索引
 */
function clickCheckboxFuc(self, index) {
  switch (index) {
    case 0:
      self.isFuZhuXianChecked = !self.isFuZhuXianChecked;
      break;
    case 1:
      self.isOmitChecked = !self.isOmitChecked;
      break;
    case 2:
      self.isYiLouTiaoChecked = !self.isYiLouTiaoChecked;
      break;
    case 3:
      self.isZouShiChecked = !self.isZouShiChecked;
      if (self.isZouShiChecked) {
        createZouShi(self, self.zouShiLineClassArr);
      } else {
        destroyZouShiDom(self.zouShiLineClassArr);
      }
      break;
    case 4:
      self.isNumberTempChecked = !self.isNumberTempChecked;
      break;
    default:
      break;
  }
}

export default clickCheckboxFuc
